package com.mq.consumer.listener;


import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class SpringRabbitListener {

    @RabbitListener(queues = "xxx_queue")
    public void listenQueue(String msg) {
        System.out.println("接收到消息:" + msg);
    }

}
